package com.zz.apk.dialog

import android.app.Dialog
import android.os.Bundle
import com.zz.framework.core.base.DialogFragmentInterface

class CustomDialogFragment : BaseDialogFragment() {

    lateinit var dialogCreateListener: DialogFragmentInterface.DialogCreateListener

    companion object {
        fun newInstance(
            dialogCreateListener: DialogFragmentInterface.DialogCreateListener
        ): CustomDialogFragment {
            val fragment = CustomDialogFragment()
            fragment.dialogCreateListener = dialogCreateListener
            return fragment
        }
    }

    override fun onCreateDialog(savedInstanceState: Bundle?): Dialog {
        return dialogCreateListener.create(savedInstanceState)
    }

}